package cn.lg.soar.message.service;

import cn.lg.soar.mvc.manager.SseManager;

import java.util.Collection;

/**
 * Sse服务
 * @author luguoxiang
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
public class SseService extends SseManager {

    /**
     * 广播消息
     * @param message
     */
//    @Async
    public void sendMsgAllAsync(String topic, String message) {
        sendMsgByClient(topic, message);
    }

    /**
     * 发送消息
     */
//    @Async
    public void sendMsgByUserAsync(String topic, String message, Collection<Long> userIds) {
        sendMsgByUser(topic, message, userIds);
    }

    /**
     * 发送消息
     */
//    @Async
    public void sendMsgByUserAsync(String topic, String message, Long...userIds) {
        sendMsgByUser(topic, message, userIds);
    }

}
